package com.mail.anteater.config;

import org.apache.log4j.Logger;

import com.mail.anteater.core.MailMain;

public class ConfigValues {
	
	final static Logger logger = Logger.getLogger(ConfigValues.class);

	static{
		ConfigValues.fetchSettings();
	}
	
	public static String DATABASE_URL;
	public static String DATABASE_NAME;
	public static String DATABASE_USERNAME;
	public static String DATABASE_PASSWORD;
	
	public static void fetchSettings(){
		logger.info("Initializing configuration values..");
		
		DATABASE_URL = MailMain.getConfig().getString(ConfigConstants.DATABASE_URL);
		DATABASE_NAME = MailMain.getConfig().getString(ConfigConstants.DATABASE_NAME);
		DATABASE_USERNAME = MailMain.getConfig().getString(ConfigConstants.DATABASE_USERNAME);
		DATABASE_PASSWORD = MailMain.getConfig().getString(ConfigConstants.DATABASE_PASSWORD);
	}
}
